home *** CD-ROM | disk | FTP | other *** search
- //
- // Example of bump mapping on a sphere
- //
- // Generic Polyray input File
- // Polyray input file: Alexander Enzmann
-
- // Set up the camera
- viewpoint {
- from <0,5,-10>
- at <0,0,0>
- up <0,1,0>
- angle 45
- resolution 256, 256
- }
-
- background <0, 0, 0>
- spot_light 0.7*white, <-10, 20, -20>, <0, 0, 2>, 1, 15, 20
- spot_light 0.7*white, <-10, 10, 10>, <0, 0, 0>, 1, 15, 20
-
- define tile_bumps image("tile1.jpg")
-
- define bumpmap_red1
- texture {
- special surface {
- color red
- normal planar_bumpmap(tile_bumps, <8*u, 0, 8*v>, 3)
- ambient 0.1
- diffuse 0.7
- specular white, 0.5
- microfacet Cook 5
- }
- }
-
- define bumpmap_red2
- texture {
- special surface {
- color red
- normal planar_bumpmap(tile_bumps, P, 3)
- ambient 0.1
- diffuse 0.7
- specular white, 0.5
- microfacet Cook 5
- }
- }
-
- object {
- object { torus 2, 0.75, <0, -1.25, 0>, <0, 1, 0> }
- + object { cone <0, -2, 0>, 1, <0, 3, 0>, 0 }
- + object { sphere <2, 0, 4>, 2 }
- bumpmap_red1
- }
- object {
- disc <0,-2, 0>, <0, 1, 0>, 30
- bumpmap_red2 { scale <2, 2, 2> }
- }
-